public class Main {
    public static void main(String[] args) throws Exception {
        Thread thread1 = new Thread(){
            @Override
            public void run() {
                for (int i = 0; i < 3; i++) {
                    System.out.println("这里是线程t1,共执行3次");
                }
            }
        };

        Thread thread2 = new Thread(){
            @Override
            public void run() {
                for (int i = 0; i < 2; i++) {
                    System.out.println("这里是线程t2，共执行2次");
                }
            }
        };

        Thread thread3 = new Thread(){
            @Override
            public void run() {
                for (int i = 0; i < 1; i++) {
                    System.out.println("这里是线程t3,共执行1次");
                }
            }
        };
        //20230404430920沈泽华
        thread1.start();
        thread1.join();
        thread2.start();
        thread2.join();
        thread3.start();
        thread3.join();
    }
}
